<div class="translations_navigation" <%=tr8n_dir_attribute_tag%>>
  <div style="float:right">
    <%= form_tag("/tr8n/phrases", :id => "tr8n_key_search_form", :method => :get) do %>
        <%= text_field_tag("search", "", :style => "width:150px;font-size:13px;background: white url(/assets/tr8n/icn_search.png) right no-repeat; padding-right: 20px; border-radius:10px;", :placeholder => trla("Quick search")) %>
    <% end %>
  </div>

  <div style="font-size:22px; font-weight: bold;padding-bottom:15px; <%=tr8n_style_attribute_tag('text-align', 'left')%>;">
	 <%=tra("Translation Tools") %>
	 - <%=tra("{language} Language", nil, :language => tr8n_current_language.native_name)%>
	 <% if tr8n_current_language.default? %> 
		 <% if tr8n_current_user_is_admin? %>
		   <%=link_to(tra("manage", "Link to manage language"), "/tr8n/language", :style => "font-size:12px;")%>
		 <% end %>
 	 <% else %>
		 <% if tr8n_current_user_is_manager? %>
		   <%=link_to(tra("manage", "Link to manage language"), "/tr8n/language", :style => "font-size:12px;")%>
		 <% end %>
	 <% end %>  
	</div>
  
  <ul class="translations_tab_nav translations_tabs">
      <% tr8n_features_tabs.each do |tab| %>
        <%  classes = []
            section_key_condition = tab[:key].to_s == "sitemap" ? (@section_key != nil) : (@section_key == nil)

            if tab[:actions].any?
              current = (tab[:controller] == controller.controller_name and tab[:actions].include?(controller.action_name) and section_key_condition) 
            else
              current = (tab[:controller] == controller.controller_name and section_key_condition) 
            end 

            classes << "current" if current
            if tr8n_features_tabs.first == tab
              classes << "first" 
              classes << "first_current" if current
            elsif tr8n_features_tabs.last == tab
              classes << "last"
              classes << "last_current" if current
            end   
        %>
        
        <li class="<%=classes.join(' ') %>">
          <%=link_to(tra(tab[:title], "Feature title"), tab[:link])%>
        </li>

      <% end %>
  </ul>
</div>
